xen/arm: vpl011: Define common ring buffer helper functions in console.h
authorBhupinder Thakur <bhupinder.thakur@linaro.org>
Wed, 27 Sep 2017 06:13:10 +0000 (11:43 +0530)
committerStefano Stabellini <sstabellini@kernel.org>
Tue, 3 Oct 2017 18:36:34 +0000 (11:36 -0700)
commitaf8d9356417cb617b635c5ace782388ebfe86e3a
tree106a9ef16dec987765b89f34be7b3a7f2c21a54e
parentdbc4b6e13a5d0dd8967cde7ff7000ab1ed88625e
xen/arm: vpl011: Define common ring buffer helper functions in console.h

DEFINE_XEN_FLEX_RING(xencons) defines common helper functions such as
xencons_queued() to tell the current size of the ring buffer,
xencons_mask() to mask off the index, which are useful helper functions.
pl011 emulation code will use these helper functions.

io/console.h includes io/ring.h which defines DEFINE_XEN_FLEX_RING.

In console/daemon/io.c, string.h had to be included before io/console.h
because ring.h uses string functions.

Signed-off-by: Bhupinder Thakur <bhupinder.thakur@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
tools/console/daemon/io.c
xen/include/Makefile
xen/include/public/io/console.h